package tour.customer.service;

import java.sql.SQLException;
import java.util.ArrayList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tour.customer.dao.MemberDAO;
import tour.customer.to.MemberTO;


@Service
public class TourService { 

	private MemberDAO dao;
	
	@Autowired
	public TourService(MemberDAO dao){
		this.dao = dao;
	}
	
	public MemberTO selectMemberInfoByIdController(String id) throws SQLException{
		return dao.selectMemberInfoByIdController(id);
	}
	
	public void insertMember(MemberTO member)throws SQLException{
		dao.insertMember(member);
	}
	
	//회원정보수정
	public void updateMemberInfoController(MemberTO m ) throws SQLException{
		dao.updateMemberInfoController(m);
	}
	
	// 주소
	public ArrayList address(String address) throws SQLException{
		return dao.address(address);
	}
	//탈퇴
	public void deleteMember(String member) throws SQLException{
		 dao.deleteMember(member);
	}
	//아이디찾기
	public String searchId(MemberTO m) throws SQLException{
		 return dao.searchId(m); 
	}
	//비밀번호찾기
	public String searchPassword(MemberTO m) throws SQLException{
		 return dao.searchPassword(m); 
	}
	
	// 전체 조회
	public ArrayList memberList() throws SQLException{
		return dao.memberList();
	}

	public ArrayList memberNickList(String nickname) throws SQLException {
		return dao.memberNickList(nickname);
	}
	
	//닉네임 조회
	
	
}
